package Three;
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		Rectangle[] r=new Rectangle[2];
		Circle[] c=new Circle[2];
		r[0]=new Rectangle(scan.nextInt(),scan.nextInt());
		r[1]=new Rectangle(scan.nextInt(),scan.nextInt());
        c[0]=new Circle(scan.nextInt());
        c[1]=new Circle(scan.nextInt());
        System.out.println(r[0].getPerimeter()+r[1].getPerimeter()+c[0].getPerimeter()+c[1].getPerimeter());
        System.out.println(r[0].getArea()+r[1].getArea()+c[0].getArea()+c[1].getArea());
        System.out.println(Arrays.toString(r));
        System.out.println(Arrays.toString(c));
        scan.close();
	}

}
